import Mock from 'mockjs2'
import { builder } from '../response'

const comments = (options) => {
  const list = [
    // dashboard
    {
      user: {
        pic: '/img/bear-200-200.jpg',
        name: 'walker',
        isVip: 3
      },
      created: '2021-03-05T10:13:04.439Z',
      content: '这个不错啊',
      handed: 1,
      hands: 4

    },
    {
      user: {
        pic: '/img/bear-200-200.jpg',
        name: 'walker',
        isVip: 0
      },
      created: '2021-03-05T10:13:04.439Z',
      content: '这个不错啊',
      handed: 0,
      hands: 0

    },
    {
      user: {
        pic: '/img/bear-200-200.jpg',
        name: 'walker',
        isVip: 1
      },
      created: '2021-03-05T10:13:04.439Z',
      content: '这个不错啊',
      handed: 0,
      hands: 0

    }, {
      user: {
        pic: '/img/bear-200-200.jpg',
        name: 'walker',
        isVip: 3
      },
      created: '2021-03-05T10:13:04.439Z',
      content: '这个不错啊',
      handed: 0,
      hands: 0

    }
  ]
  const json = builder(list, '请求成功', 200)
  console.log('json', json)
  return json
}

Mock.mock(/\/public\/comments/, 'get', comments)
